home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-11-03 | 45.4 KB | 1,298 lines |
- Newsgroups: comp.sources.misc
- subject: v08i110: pcmail part 02 of 08
- From: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
- Reply-To: markl@oracle.com (Croaker the Physician)
-
- Posting-number: Volume 8, Issue 110
- Submitted-by: markl@oracle.com (Croaker the Physician)
- Archive-name: pcmail/part02
-
- #--------------------------------CUT HERE-------------------------------------
- #! /bin/sh
- #
- # This is a shell archive. Save this into a file, edit it
- # and delete all lines above this comment. Then give this
- # file to sh by executing the command "sh file". The files
- # will be extracted into the current directory owned by
- # you with default permissions.
- #
- # The files contained herein are:
- #
- # -rw-rw-r-- 1 markl 32875 Nov 2 07:53 mailhelpab
- # -rwxrwxr-x 1 markl 2910 Oct 30 12:18 mh-to-pcmail-export
- # -rw-r--r-- 1 markl 7448 Oct 30 15:47 nntp.c
- #
- echo 'x - mailhelpab'
- if test -f mailhelpab; then echo 'shar: not overwriting mailhelpab'; else
- sed 's/^X//' << '________This_Is_The_END________' > mailhelpab
- X
- XRead a folder filter type from the minibuffer. Input completion is
- Xpermitted; input defaults to the last filter name given a filter
- Xcommand. Go to the nearest previous message passed by the filter.
- X
- X
- X5.1.3 Attribute Setting Commands
- X
- Xd: pcmail-delete-message
- X
- XDelete this message and move to the next interesting message in the
- Xmessage subset. Deleted messages always remain in the folder until
- Xthe folder is expunged. With a prefix argument, delete and move to
- Xthe next message in the message subset whether or not it is
- Xinteresting.
- X
- XC-d: pcmail-delete-message-backward
- X
- XAs above, but move to the nearest previous interesting message after
- Xdeletion, rather than the next.
- X
- XESC C-d: pcmail-delete-subset
- X
- XDelete all messages in the message subset.
- X
- Xi: pcmail-change-message-priority
- X
- XMessages can be assigned positive numeric priorities; the higher the
- Xnumber, the lower the priority and presumably the less important the
- Xmessage. The priority is placed in a "priority:" field in the message
- Xheader and used in two places. First, a folder's contents can be
- Xsorted by priority, highest to lowest. Second, the default
- Xinteresting-message hook defines messages with a priority number
- Xgreater than or equal to 5 as "uninteresting". User-defined
- Xpigeonhole hooks can also use a message's priority to categorize the
- Xmessage. Pcmail-change-message-priority requests a priority from the
- Xminibuffer and assigns the current message that priority. With a
- Xprefix argument, the command deletes the current priority. Messages
- Xwith no priority default to being highest priority.
- X
- XESC C-i: pcmail-change-priority-subset
- X
- XAs above, but set all messages in the current subset to the specified
- Xpriority.
- X
- Xk: pcmail-kill-message-later
- X
- XRead a date of the form dd-mmm-yy from the minibuffer and place it in
- Xthe current message's "expires:" header field. Set the current
- Xmessage's "timely" attribute. With a prefix argument, do not read a
- Xdate; instead, clear the current message's "timely" attribute and
- X"expires:" header field, no longer making it a candidate for automatic
- Xremoval.
- X
- XThe mail reader uses the "expires:" field described above to perform
- Xautomatic message removal. When the user opens a folder, if the
- Xcurrent date is greater than the date on any message's expiration
- Xfield (if it has one), the mail reader applies the Emacs-Lisp
- Xhook expression pcmail-expiration-hook to the message, clears the
- Xmessage's "timely" attribute, and set its "expired" attribute. The
- Xdefault pcmail-expiration-hook sets the expired message's "deleted"
- Xattribute so the next folder expunge destroys the message.
- X
- Xu: pcmail-undelete-previous-message
- X
- XLooking backward from and including the current message, clear the
- Xnearest deleted message's "deleted" attribute.
- X
- XESC C-u: pcmail-undelete-subset
- X
- XClear the "deleted" attribute of every deleted message in the current subset.
- X
- Xy: pcmail-change-message-attr
- X
- XPrompt for an attribute name and toggle that attribute of the current
- Xmessage. Input completion is permitted; input defaults to last
- Xattribute given to an attribute command. If the attribute supplied
- Xdoes not exist, offer to create it. User-defined attributes are
- Xtherefore created simply by entering a name which the mail reader has
- Xnot seen before. THe mail reader stored such attributes in the
- Xprimary folder's header and loads them whenever that folder is opened.
- X
- XWith a prefix argument, don't toggle the attribute. Instead, if the
- Xargument is positive, set the attribute; if negative, clear the
- Xattribute. The mail reader pre-defines the following message
- Xattributes:
- X
- Xanswered undigestified
- Xbadheader unseen
- Xcopied deleted
- Xedited expired
- Xfiled forwarded
- Xprecious printed
- Xrecent timely
- X
- XSpecial note needs to be made about the "precious" attribute.
- XMessages with the "precious" attribute cannot be deleted. This
- Xprevents inadvertent deletion of important messages (for example by
- Xthe print, copy, and archive commands if the
- Xdelete-on{print,copy,archive} flags are set).
- X
- XThe "badheader" attribute is set on any mail-drop file which the mail
- Xreader cannot process because the collection's mail-drop format is
- Xincorrect for a mail-drop of that type. In these cases the mail
- Xreader collects the file contents into a single message with a special
- Xheader, and sets the "badheader" attribute.
- X
- XESC C-y: pcmail-change-attr-subset
- X
- XAs above, but perform the attribute change on every message in the
- Xmessage subset.
- X
- Xz: pcmail-zap-to-message
- X
- XDelete all messages in the message subset starting with the current
- Xmessage and moving forward.
- X
- X
- X5.1.4 Mail Composition Commands
- X
- XThe following commands allow users to compose new messages, or reply
- Xto or forward existing messages. Executing any composition command
- Xplaces the user in a message composition buffer and puts the buffer in
- XMail Mode. See the GNU-Emacs Mail Mode documentation for details on
- Xcommands available in Mail Mode.
- X
- XPcmail implements a number of enhancements to Mail Mode whih overlay
- Xstandard Mail Mode commands on entry. One of these is an augmented
- Xmessage-insert function. Normal Mail Mode allows a user to insert the
- Xcurrent message text into a reply or forwarded message with an
- Xinsert-message function (keystrokes C-C C-Y). The enhanced function,
- Xwhich supersedes the normal function, will insert any message N from
- Xthe current folder if the user supplies a prefix argument N to the
- Xinsert command. If the "supercite" package's "mail-yank-hooks" hook
- Xvariable is set, the hook will be run, allowing incorporation of
- Xsupercite functionality.
- X
- XIf a message is inserted with the insert command, the default yank
- Xhook is used, and the variable pcmail-yank-prefix is set to a string,
- Xthen that string will preface each nonblank line of the inserted
- Xmessage. This provides an easy way to specially highlight referenced
- Xmessages (with a ">" for example) within an outgoing message.
- X
- X
- X5.1.4.1 Mail Mode Configuration Variables
- X
- XPcmail makes use of a number of mail-composition mode configuration
- Xvariables. Although they are fully described in the GNU-Emacs mail
- Xmode documentation, they are also defined here for completeness.
- X
- Xmail-header-separator
- X
- XThe text separating the message header from its body in the mail
- Xcomposition buffer. Most users will not want to change this. Default
- Xvalue is the string "-- text follows this line --".
- X
- Xmail-use-rfc822
- X
- XWhen replying to or forwarding a message, use a full NIC RFC-822
- Xparser to extract field information from the source messages. Since
- Xthis is usually overkill, the default value for this variable is NIL.
- X
- Xmail-yank-ignored-headers
- X
- XWhen the pcmail-insert-current-message command inserts a message into
- Xthe message composisiton buffer, the default yank hook prunes the
- Xinserted message's headers by filtering them through the
- Xmail-yank-ignored-headers regular expression. Default value is:
- X
- X "^via:\\|^mail-from:\\|^origin:\\|^status:\\|^remailed\\|^received:\\|
- X ^[a-z-]*message-id:\\|^summary-line:\\|^to:\\|^cc:\\|^subject:\\|
- X ^in-reply-to:\\|^return-path:"
- X
- Xmail-default-reply-to:
- X
- XIf non-NIL, an address to insert as the default Reply-to field of outgoing
- Xmessages. Default value is NIL.
- X
- Xmail-setup-hook:
- X
- XIf non-NIL, a hook expression evaluated on entry into the mail
- Xcomposition buffer. The hook expression is typically used to insert
- Xcustom header fields into outgoing messages. Default value is NIL.
- X
- Xmail-self-blind:
- X
- XIf non-NIL, you will be sent a BCC copy of every outgoing message.
- XDefault value is NIL.
- X
- Xmail-archive-file-name:
- X
- XIf non-NIL, each outgoing message will have an "FCC:" field which
- Xcauses the message to be appended to the file named by
- Xmail-archive-file-name before transmission. The "FCC:" field is
- Xstripped before transmission and after archiving.
- X
- Xmail-aliases:
- X
- XIf non-NIL and not T, mail-aliases is an association list binding
- Xalias names to mail addresses. The aliases can be placed in outgoing
- Xmessage "To:", "Cc:", and "Bcc:" fields and will be automatically
- Xexpanded on transmission. If mail-aliases is T, read a ".mailrc" file
- Xand replace mail-aliases with an association list derived from the
- Xfile. A ".mailrc" file consists of text lines of the form:
- X
- X alias foo foo@oracle.com
- X
- X
- Xrmail-dont-reply-to-names:
- X
- XA regular expression describing addresses not to be included in the
- X"CC:" field of a message reply. This prevents inadvertent reply CCs
- Xto mailing lists while enabling direct replies. Note that this only
- Xaffects the contents of the mail composition buffer upon entry. You
- Xcan add addresses at will once the composition buffer is entered.
- XDefault value is NIL, which means don't reply to yourself.
- X
- X
- X5.1.4.2 Mail Composition Commands
- X
- Xf: pcmail-forward-message
- X
- XForward the current message. On entry to the composition buffer, the
- Xcomposed message header will already contain a "subject:" field
- Xderived from the forwarded message's header. Insert the forwarded
- Xmessage in the composed message. The inserted message's header is
- Xpruned according to the regular expression mail-yank-ignored-headers
- Xunless a prefix argument is supplied. If
- Xpcmail-highlight-forwarded-message is non-NIL, bracket the inserted
- Xmessage text with "begin forwarded message" and "end forwarded
- Xmessage". See the GNU-Emacs Mail Mode documentation for details on
- Xcommands available in Mail Mode.
- X
- XThe message's "forwarded" attribute is set after the message being
- Xcomposed is transmitted. If the composed message is aborted for some
- Xreason, then the attribute is not set.
- X
- XNote that normal DARPA Internet RFC-822 mail addresses can be used in
- Xthe message header fields, even on VMS. The system-dependent mail
- Xtransmission hooks will translate addresses to operating-system
- Xformat as required.
- X
- Xm, C-x m: pcmail-mail
- X
- XCompose a message in another window. See the GNU-Emacs Mail Mode
- Xdocumentation for details on commands available in Mail Mode.
- X
- XNote that normal DARPA Internet RFC-822 mail addresses can be used in
- Xthe message header fields, even on VMS. The system-dependent mail
- Xtransmission hooks will translate addresses to operating-system
- Xformat as required.
- X
- Xr: pcmail-answer-message
- X
- XReply to the current message. On entry into the composition buffer,
- Xthe reply header will already contain "to:", "subject:", and
- X"in-reply-to:" fields derived from the replied-to message's message
- Xheader. By default, all addresses in the original message's "to:" and
- X"cc:" header fields are CC'd in the reply. To disable this feature,
- Xinvoke the reply command with a prefix argument. If
- Xpcmail-yank-message-on-reply is non-NIL, place a copy of the
- Xreplied-to message in the body of the reply. The inserted message is
- Xprocessed according to the hook variable mail-yank-hooks. If such a
- Xhook has not been defined, a default hook is used; it indents the
- Xmessage, filters its headers according to mail-yank-ignored-headers,
- Xand prefaces nonblank lines with pcmail-yank-prefix if that variable
- Xis non-NIL.
- X
- XSee the GNU-Emacs Mail Mode documentation for more details on commands
- Xavailable in Mail Mode.
- X
- XThe message's "answered" attribute is set after the message being
- Xcomposed is transmitted. If the composed message is aborted for some
- Xreason, then the attribute is not set.
- X
- XNote that normal DARPA Internet RFC-822 mail addresses can be used in
- Xthe message header fields, even on VMS. The system-dependent mail
- Xtransmission hooks will translate addresses to operating-system
- Xformat as required.
- X
- X
- X5.1.5 Message Output Commands
- X
- Xa: pcmail-archive-message
- X
- XRead a file name from the minibuffer. Input completion is permitted;
- Xinput defaults to the last file supplied to an archive command.
- XAppend the current message to the file. If the variable
- Xpcmail-delete-on-archive is non-NIL, delete the message after
- Xarchiving and move to the next interesting message in the message
- Xsubset. With a prefix argument, do not delete the message after
- Xarchiving no matter what the setting of pcmail-delete-on-archive. Set
- Xthe message's "filed" attribute.
- X
- XESC C-a: pcmail-archive-subset
- X
- XAs above, but archive (and potentially delete after archiving) all
- Xmessages in the message subset.
- X
- Xc: pcmail-copy-message
- X
- XRead a folder name from the minibuffer and copy the current message
- Xto that folder. Input completion is permitted; input defaults to
- Xthe name of the last folder given to a folder command. If the
- Xvariable pcmail-delete-on-copy is non-NIL, delete the message after
- Xcopying and move to the next interesting message in the message
- Xsubset. With a prefix argument, do not delete the message after
- Xcopying no matter what the setting of pcmail-delete-on-copy. Set the
- Xmessage's "copied" attribute.
- X
- XESC C-c: pcmail-copy-subset
- X
- XAs above, but copy (and potentially delete after copying) all messages
- Xin the message subset.
- X
- Xo: pcmail-print-message
- X
- XRead a printer name from the minibuffer. The deafult printer name is
- Xspecified by pcmail-default-printer-name. Output the current message
- Xto the printer using an operating-system dependent print function. If
- Xthe variable pcmail-delete-on-print is non-NIL, delete the message
- Xafter printing and move to the next interesting message in the message
- Xsubset. With a prefix argument, do not delete the message after
- Xprinting no matter what the setting of pcmail-delete-on-print. Set
- Xthe message's "printed" attribute.
- X
- XESC C-o: pcmail-print-subset
- X
- XAs above, but print (and potentially delete after printing) all
- Xmessages in the message subset.
- X
- X
- X5.1.6 Folder Modification Commands
- X
- XESC c: pcmail-create-folder
- X
- XCreate a new folder. Read a folder name from the minibuffer. The
- Xname must consist of valid folder name characters (typically
- Xalphanumerics and some punctuation, where the complete set of
- Xpunctuation permitted is operating-system dependent). With a prefix
- Xargument, also read a mail drop name from the minibuffer and attach
- Xthat mail drop to the folder. When the folder is opened with the
- Xpcmail-get-mail ("g") command, any new mail will automatically be
- Xtransferred from the attached mail drop to the folder. Mail drop type
- Xcompletion is permitted; the mail drop defaults to the last mail drop
- Xsupplied to a mail drop command.
- X
- XESC d: pcmail-delete-folder
- X
- XWith a prefix argument, read a folder name from the minibuffer and
- Xdelete that folder, otherwise delete the current folder. Input
- Xcompletion is permitted; input defaults to the name of the last
- Xfolder given to a folder command. The primary folder may not be
- Xdeleted. Note that the folder need not be empty for it to be
- Xdeleted, and that once deleted, the folder may not be able to be
- Xrecovered, depending on the underlying operating system. Prompt for a
- X"yes" confirmation before deleting the folder. Delete the folder
- Xfile, remove its entry in the folder list buffer, and kill any
- Xassociated GNU-Emacs folder and summary buffers.
- X
- Xe: pcmail-expunge-folder
- X
- XWith a prefix argument, read a folder name from the minibuffer and
- Xexpunge that folder, otherwise expunge the current folder. Input
- Xcompletion is permitted; input defaults to the name of the last folder
- Xgiven to a folder command. Remove all deleted messages from the
- Xfolder. Change message numbers to fill any holes left by deleted
- Xmessages which were removed. If pcmail-wastebasket-on-expunge is
- Xnon-NIL, copy deleted messages to the folder named by
- Xpcmail-wastebasket-folder before removing (this can be a
- Xtime-consuming operation).
- X
- Xg: pcmail-get-mail
- X
- XWith a prefix argument, read a folder name from the minibuffer and
- Xopen that folder, otherwise open the current folder. Input completion
- Xis permitted; input defaults to the name of the last folder given to a
- Xfolder command. If any mail drops are attached to the folder, use
- Xtheor import functions to transfer new mail from the mail drops to the
- Xfolder. Display either the first unseen or the last interesting
- Xmessage in the folder.
- X
- Xh: pcmail-summarize-folder
- X
- XWith a prefix argument, read a folder name from the minibuffer and
- Xsummarize that folder, otherwise summarize the current folder.
- XInput completion is permitted; input defaults to the name of the last
- Xfolder given to a folder command. Display a summary of the message
- Xsubset in another window and enter the other window. The summary is
- Xplaced in Summary Mode; see the command listing under Summary Mode
- XCommands for available commands.
- X
- Xl: pcmail-load-mail-drop:
- X
- XRead a mail drop type from the minibuffer. Read any mail
- Xdrop-dependent information from the minibuffer. Use the mail drop's
- Ximport function to convert the mail drop's contents into
- XBabyl-formatted messages and add them to the current folder.
- XDepending on the mail drop type, delete the mail drop contents after
- Xincoporating them into the current folder. Mail drop type completion
- Xis permitted; input defaults to the last mail drop type given this
- Xcommand. Completion of mail drop-dependent information may also be
- Xpermitted (if the information requested is a file name, for example),
- Xdepending on the mail drop type. In addition to standard
- Xoperating-system mail drops, the mail reader provides several other
- Xmail drop types.
- X
- X babyl-mail-drop:
- X
- X Import files containing messages in Babyl format, the format that
- X both Pcmail and GNU-Emacs RMAIL use to store messages in a folder.
- X The user specifies the file name; completion on input is permitted and
- X input defaults to the file "RMAIL" in the user's home directory.
- X The file is deleted after it is incorporated.
- X
- X vms-file-mail-drop:
- X
- X Import files containing messages in VMS MAIL extraction format. This
- X is available on VMS systems only. Messages from any folder in a VMS
- X MAIL.MAI file can be transferred to a pcmail folder by extracting the
- X messages into a file and invoking pcmail-load-mail-drop with mail drop
- X type vms-file-mail-drop. The user specifies the extract file name;
- X completion on input is permitted and input defaults to the file
- X "maildrop.log" in the user's mail directory. The file is deleted after
- X it is incorporated.
- X
- X berkeley-mail-drop:
- X
- X Import files in Berkeley Mail format. The user specifies the mail
- X file name; completion on input is permitted and input defaults to the
- X file "mbox" in the user's home directory. The file is deleted after
- X it is incorporated.
- X
- X nntp-mail-drop:
- X nntp-file-mail-drop:
- X
- X The first type uses the nntp_slave program to load all recent netnews
- X messages from a newsgroup which has the same name as the current
- X folder. The second loads netnews messages which have been written
- X to a file and then deletes that file. The latter is very similar to
- X berkeley-mail-drop, except that netnews headers are slightly
- X different from ordinary mail headers
- X
- X mh-mail-drop:
- X
- X Import a named MH folder's contents into the current folder. The user
- X specifies the MH folder name; completion on input is permitted (the
- X available choices consist of all valid MH folders), although no
- X default is provided. Note that the MH folder directory and its
- X message files are not deleted after incorporation.
- X
- X
- XESC m: pcmail-list-folders
- X
- XDisplay a list of folders in another window and enter that window.
- XThe list is placed in Folder List Mode; see the command listing under
- XFolder List Mode Commands for available commands.
- X
- XESC r: pcmail-rename-folder
- X
- XWith a prefix argument, read a folder name from the minibuffer and
- Xrename that folder, otherwise rename the current folder. Input
- Xcompletion is permitted; input defaults to the name of the last
- Xfolder given to a folder command. The primary folder may not be
- Xrenamed. Read the new name from the minibuffer.
- X
- Xs: pcmail-save-folder
- X
- XWith a prefix argument, read a folder name from the minibuffer and
- Xsave that folder, otherwise save the current folder. Input
- Xcompletion is permitted; input defaults to the name of the last
- Xfolder given to a folder command. If pcmail-expunge-on-save is
- Xnon-NIL, expunge the folder before saving.
- X
- X
- X5.1.7 Miscellaneous Commands
- X
- Xb: pcmail-sort-folder
- X
- XSort the message subset by one of a number of keys. Request a sort
- Xkey from the minibuffer. Completion of input is permitted; input
- Xdefaults to the last sort key given this command. The mail reader
- Xpre-defines four sort keys:
- X
- X date: sort the subset by increasing date, where the date
- X used is the message's "date:" field.
- X
- X priority: sort the subset by decreasing priority (highest
- X priority messages first) using the message's "priority:"
- X field. Messages with no priority default to being
- X highest priority.
- X
- X recipient: sort the subset lexicographically by recipient name.
- X If there is more than one recipient, sort by the first.
- X Recipients default first to the "resent-to:" field, then
- X "resent-apparently-to:", "to:", and "apparently-to:".
- X
- X sender: sort the subset lexicographically by sender name.
- X Sender defaults first to the "resent-from:" field,
- X then "resent-sender:", "from:", and "sender:".
- X
- XESC C-f: pcmail-filter-folder
- X
- XRead a filter name and associated arguments from the minibuffer.
- XInput completion is permitted; input defaults to the last filter name
- Xgiven to a filter command. Completion may or may not be permitted on
- Xfilter arguments depending on the filter. Apply the filter to each
- Xmessage in the current folder. Messages which pass through the filter
- Xcomprise the current subset and become the only accessible messages in
- Xthe current folder. If the resulting subset is empty, do nothing,
- Xotherwise replace the current message subset with the newly generated
- Xsubset. Note that access to the entire folder can be gained by typing
- Xthe pcmail-expand-subset ("x") command.
- X
- XThe mail reader pre-defines the following filters; use the
- Xpcmail-define-filter Emacs-Lisp function to define custom filters.
- X
- Xaddress: all messages with a specified address (or address
- X fragment) in the message header's "to:", "from:", or
- X "cc:" fields.
- X
- Xall: all messages
- X
- Xattribute: all messages with a particular attribute.
- X
- Xdate-range: all messages with header "date:" fields between two
- X specified dates
- X
- Xinteresting: all interesting messages, as determined by the hook
- X expression pcmail-interesting-hook.
- X
- Xnumeric-range: all messages between two specified absolute message
- X numbers.
- X
- Xstring: all messages containing a specified string.
- X
- Xtodays: all messages with a "date:" header field of today's
- X date.
- X
- Xunanswered: all unanswered messages.
- X
- Xunseen: all unseen messages.
- X
- X
- Xq: pcmail-quit
- X
- XExit the mail reader in an orderly manner. If pcmail-save-on-quit is
- Xnon-NIL (default), save all open folders. The save process may in
- Xturn expunge before saving, depending on the value of
- Xpcmail-expunge-on-save. After saving, evaluate the Emacs-Lisp
- Xhook expression pcmail-exit-hook, and prompt for a new GNU-Emacs
- Xbuffer to switch to. With a prefix argument, do not evaluate the exit
- Xhook.
- X
- Xt: pcmail-toggle-message-header
- X
- XIf the full message header of the current message is displayed,
- Xreplace the full header by a pruned header containing no fields
- Xspecified in the list pcmail-uninteresting-fields-list. If the pruned
- Xheader is displayed, replace it with the full message header.
- XMessages headers are by default pruned before a message is displayed;
- Xtypical pruned header fields are "received:", "message-id:", and
- X"summary-line:". pcmail-uninteresting-fields-list contains the
- Xcomplete list of pruned header fields.
- X
- Xv: pcmail-version-information
- X
- XDisplay the mail reader version number and all current configuration
- Xvariable settings in another window.
- X
- Xw: pcmail-edit-message
- X
- XEdit the body of the current message. Enter Edit Mode, which causes
- Xall Folder Mode commands to be superseded by standard GNU-Emacs Text
- XMode commands for the duration of the edit. Edit Mode also provides
- Xtwo new commands for the duration of the edit: C-c C-c saves the edit
- Xand sets the message's "edited" attribute if the message was indeed
- Xchanged. C-c C-] aborts the edit and restores the original message
- Xbody. Both commands restore Folder Mode, re-enabling mail reader
- Xcommands. The hook pcmail-edit-mode-hook is run when Edit Mode is
- Xentered.
- X
- Xx: pcmail-expand-subset
- X
- XExpand the message subset to include all messages in the folder. If
- Xthe current folder has been filtered, this is a fast way of
- Xregaining access to all messages in the folder.
- X
- XESC x pcmail-undigestify-message
- X
- XIf the current message is a UNIX Digest-format message, burst it into
- Xits constituent messages. Append the messages to the current subset if
- Xthey pass the current folder filter. Delete the digest and move to
- Xthe next interesting message in the message subset. All constituent
- Xmessages automatically share the parent digest's attributes. A
- Xforwarded message containing a digest is undigestified transparently .
- X
- X
- X
- X5.2 Folder List Mode Commands
- X
- XThe folder list buffer is always placed in Folder List Mode. The
- Xbuffer contains a line of descriptive information about each existing
- Xfolder; the list is displayed from Folder Mode with the
- Xpcmail-list-folders ("ESC m") command. Folder List Mode commands
- Xgenerally operate on the "current folder", which is the folder whose
- Xdescription is next to the cursor. Each Folder List Mode command has
- Xa corresponding Folder Mode command; descriptions of Folder List
- XMode commands will be brief and will refer to the corresponding
- XFolder Mode commands.
- X
- X?: describe-mode
- X
- XDisplay a list of available commands and the keystrokes they are bound
- Xto. Typing The GNU-Emacs Help key, followed by "k" or "f" will
- Xpresent documentation on functions by keystroke or function name,
- Xrespectively.
- X
- X.: pcmail-folder-list-beginning-of-message
- X
- XOpen the folder next to the cursor and display its current message.
- X
- Xc: pcmail-folder-list-create-folder
- X
- XCreate a new folder. See pcmail-create-folder.
- X
- Xd: pcmail-folder-list-delete-folder
- X
- XDelete the folder next to the cursor. See pcmail-delete-folder.
- X
- Xe: pcmail-folder-list-expunge-folder
- X
- XExpunge the folder next to the cursor. See pcmail-expunge-folder.
- X
- Xg, i: pcmail-folder-list-get-mail
- X
- XOpen the folder next to the cursor; if mail drops are attached to the
- Xfolder, get any new mail. See pcmail-get-mail.
- X
- Xh: pcmail-folder-list-summarize-folder
- X
- XOpen the folder next to the cursor and display the folder and a
- Xsummary of its messages in another window. See
- Xpcmail-summarize-folder and Summary Mode.
- X
- Xq: pcmail-quit
- X
- XExit the mail reader in an orderly manner. See full information under
- XFolder Mode.
- X
- Xr: pcmail-folder-list-rename-folder
- X
- XRename the folder next to the cursor. See pcmail-rename-folder.
- X
- Xs: pcmail-folder-list-save-folder
- X
- XSave the folder next to the cursor. See pcmail-save-folder.
- X
- Xx: pcmail-folder-list-exit
- X
- XExit the folder list display, returning to the current folder and
- Xdeleting the folder list window.
- X
- X
- X
- X5.3 Summary Mode
- X
- XThe summarize commands create a summary of the messages in a folder's
- Xmessage subset. Each message has one line of information in the
- Xsummary. The type of information that is displayed is controlled by
- Xthe configuration variable pcmail-summary-format. See the section
- Xdescribing configuration variables for full information. The default
- Xsummary format contains the message's number, "date:" field, "from:"
- Xfield, and "subject:" field, as well as a note whether the message is
- Xunseen or has been deleted. The folder is placed in one Emacs window,
- Xthe summary in another. Summaries are always placed in Summary Mode.
- XMany of the commands available in Folder Mode are also available in
- XSummary Mode; in cases where a particular Folder Mode command applies
- Xto the current message, the corresponding Summary Mode command applies
- Xto the message identified by the current summary line (the summary
- Xline where the cursor currently is located). For simplicity's sake,
- Xthat message will be called the "current summary message".
- X
- XAny Summary Mode commands which change the number or order of messages
- Xin the summary (pcmail-expunge-folder, pcmail-get-mail,
- Xpcmail-filter-folder) will cause the folder to be automatically
- Xresummarized.
- X
- X
- X5.3.1 Getting Help
- X
- X?: describe-mode
- X
- XDisplay a list of available commands and the keystrokes they are bound
- Xto. Typing The GNU-Emacs Help key, followed by "k" or "f" will
- Xpresent documentation on functions by keystroke or function name,
- Xrespectively.
- X
- X
- X5.3.2 Movement Commands:
- X
- X>: pcmail-summary-last-message
- X
- XMove to the last interesting message in the summary and display it in
- Xthe other window. With a prefix argument, move to the last message
- Xwhether or not it is interesting.
- X
- X<: pcmail-summary-first-message
- X
- XMove to the first message in the summary and display it in the other
- Xwindow.
- X
- X.: pcmail-summary-beginning-of-message
- X
- XMove to the beginning of the current summary message. Display that
- Xmessage in the other window if it is not already displayed.
- X
- XSPC: pcmail-summary-scroll-message-up
- X
- XDisplay the next page of the current summary message in the other
- Xwindow.
- X
- XDEL: pcmail-summary-scroll-message-down
- X
- XDisplay the previous page of the current summary message in the other
- Xwindow.
- X
- Xj: pcmail-summary-goto-message
- X
- XWith a prefix argument N, go to the Nth summary message and display it
- Xin the other window. With no prefix argument, display the current
- Xsummary message in the other window.
- X
- Xn, RET: pcmail-summary-next-message
- X
- XMove to the next interesting message in the summary and display it.
- XSee pcmail-next-message.
- X
- XESC n: pcmail-summary-next-message-of-type
- X
- XMove to the next message that satisfies a specified folder filter and
- Xdisplay it in the other window. See pcmail-next-message-of-type
- X
- Xp: pcmail-summary-previous-message
- X
- XMove to the nearest previous interesting message in the summary and
- Xdisplay it in the other window. See pcmail-previous-message.
- X
- XESC p: pcmail-summary-previous-message-of-type
- X
- XMove to the nearest previous message that satisfies a specified
- Xfolder filter and display it in the other window. See
- Xpcmail-previous-message-of-type.
- X
- X
- X5.3.3 Attribute Modifying Commands:
- X
- Xd: pcmail-summary-delete-message
- X
- XDelete the current summary message, move to the next interesting
- Xsummary message, and display it in the other window. See
- Xpcmail-delete-message.
- X
- XC-d: pcmail-summary-delete-message-backward
- X
- XDelete the current summary message, move backward to the first
- Xinteresting message, and display it in the other window. See
- Xpcmail-delete-message-backward
- X
- Xk: pcmail-summary-kill-message-later
- X
- XMake the current summary message expire at some point in the future.
- XSee pcmail-kill-message-later.
- X
- Xu: pcmail-summary-undelete-message
- X
- XSearching backward from and including the current summary message,
- Xundelete the first deleted message found and display it in the other
- Xwindow. See pcmail-undelete-message
- X
- Xy: pcmail-summary-change-attr
- X
- XToggle an attribute of the current summary message. See
- Xpcmail-change-attr.
- X
- X
- X5.3.4 Mail Composition Commands:
- X
- Xf: pcmail-summary-forward-message
- X
- XForward the current summary message. See pcmail-forward-message.
- XNote that transmitting the message will not cause a return to the summary;
- Xit will return to the current message in the folder.
- X
- Xm: pcmail-summary-mail
- X
- XCompose a message in the other window. See pcmail-mail. Note that
- Xtransmitting the message will not cause a return to to the summary; it will
- Xreturn to the current message in the folder.
- X
- Xr: pcmail-summary-answer-message
- X
- XReply to the current summary message. See pcmail-answer-message.
- XNote that transmitting the message will not cause a return to to the
- Xsummary; it will return to the current message in the folder.
- X
- X
- X5.3.5 Message Output Commands:
- X
- Xa: pcmail-summary-archive-message
- X
- XArchive the current summary message to a file. See pcmail-archive-message.
- X
- Xc: pcmail-summary-copy-message
- X
- XCopy the current summary message to another folder. See pcmail-copy-message.
- X
- Xo: pcmail-summary-print-message
- X
- XPrint the current summary message. See pcmail-print-message.
- X
- X
- X5.3.6 Folder Modification Commands:
- X
- Xe: pcmail-summary-expunge-folder
- X
- XExpunge the current folder, re-summarizing afterwards. See
- Xpcmail-expunge-folder.
- X
- Xg, i: pcmail-summary-get-mail
- X
- XTransfer any new mail from the current folder's mail drops,
- Xre-summarizing afterwards. See pcmail-get-mail.
- X
- Xs: pcmail-summary-save-folder
- X
- XSave the current folder. If pcmail-expunge-on-save is non-NIL,
- Xexpunge before saving and re-summarize.
- X
- X
- X5.3.7 Miscellaneous Commands:
- X
- Xb: pcmail-summary-sort-folder
- X
- XSort the current subset and generate an appropriate new summary,
- Xre-summarizing afterwards. See pcmail-sort-folder.
- X
- XESC C-f: pcmail-summary-filter-folder
- X
- XFilter the current folder according to a user-specified filter,
- Xre-summarizing afterward. See pcmail-filter-folder.
- X
- Xq: pcmail-summary-quit
- X
- XExit the mail reader in an orderly manner. See pcmail-quit
- X
- Xw: pcmail-summary-edit-message
- X
- XEdit the body of the current summary message. See
- Xpcmail-edit-message.
- X
- Xx: pcmail-summary-exit
- X
- XExit the summary, deleting the summary window and returning to the
- Xcurrent folder.
- ________This_Is_The_END________
- if test `wc -c < mailhelpab` -ne 32875; then
- echo 'shar: mailhelpab was damaged during transit (should have been 32875 bytes)'
- fi
- fi ; : end of overwriting check
- echo 'x - mh-to-pcmail-export'
- if test -f mh-to-pcmail-export; then echo 'shar: not overwriting mh-to-pcmail-export'; else
- sed 's/^X//' << '________This_Is_The_END________' > mh-to-pcmail-export
- X#!/bin/csh -f
- X#
- X# GNU-EMACS PCMAIL mail reader support utility
- X
- X# Written by Mark L. Lambert
- X# Architecture Group, Network Products Division
- X# Oracle Corporation
- X# 20 Davis Dr,
- X# Belmont CA, 94002
- X#
- X# internet: markl@oracle.com or markl%oracle.com@apple.com
- X# UUCP: {hplabs,uunet,apple}!oracle!markl
- X
- X# Copyright (C) 1989 Mark L. Lambert
- X
- X# This file is not officially part of GNU Emacs, but is being
- X# donated to the Free Software Foundation. As such, it is
- X# subject to the standard GNU-Emacs General Public License,
- X# referred to below.
- X
- X# GNU Emacs is distributed in the hope that it will be useful,
- X# but WITHOUT ANY WARRANTY. No author or distributor
- X# accepts responsibility to anyone for the consequences of using it
- X# or for whether it serves any particular purpose or works at all,
- X# unless he says so in writing. Refer to the GNU Emacs General Public
- X# License for full details.
- X
- X# Everyone is granted permission to copy, modify and redistribute
- X# GNU Emacs, but only under the conditions described in the
- X# GNU Emacs General Public License. A copy of this license is
- X# supposed to have been given to you along with GNU Emacs so you
- X# can know your rights and responsibilities. It should be in a
- X# file named COPYING. Among other things, the copyright notice
- X# and this notice must be preserved on all copies.
- X
- X# MH-to-pcmail exporter. Takes two arguments: a folder name and an output
- X# file name (to hold the folder's concatenated messages). Concatenates
- X# all messages in the folder into a single file, separated by regular
- X# expression. The folder directories are assumed to live in the standard
- X# MH folder directory ~/Mail/.
- X
- Xif ($#argv < 2) then
- X echo "mh-to-pcmail-export: missing arguments"
- X exit 1
- Xendif
- Xif (! -d ~/Mail ) then
- X echo "mh-to-pcmail-export: no folder directory ~/Mail/"
- X exit 1
- Xendif
- Xif (! -d ~/Mail/$1 ) then
- X echo "mh-to-pcmail-export: no folder named $1"
- X exit 1
- Xendif
- Xcd ~/Mail/$1
- X
- X# remove any old control files
- X#
- X# export-filelist contains an unsorted list of shell commands
- X# that will append messages to a message file
- X# export-sorted-filelist is the numerically-sorted version of
- X# the above, so messages are appended in numerical, not
- X# lexicographic, order
- X# export-message-separator is a file containing message separator text
- X
- Xif ( -e export-filelist ) rm export-filelist
- Xif ( -e export-sorted-filelist ) rm export-sorted-filelist
- Xif ( -e export-message-separator ) rm export-message-separator
- Xif ( -e $2 ) rm $2
- Xcat << END > export-message-separator
- Xbegin-message
- XEND
- X
- Xforeach mailfile ( [0-9]* )
- X cat << bletch >> export-filelist
- Xcat export-message-separator $mailfile >> $2
- Xbletch
- Xend
- X
- X# sort the list of append commands
- X
- Xsort -n +2 -3 export-filelist > export-sorted-filelist
- X
- X# execute the append recursively (uck)
- X
- Xsource export-sorted-filelist
- X
- X# and clean up
- X
- Xrm export-filelist export-sorted-filelist export-message-separator
- ________This_Is_The_END________
- if test `wc -c < mh-to-pcmail-export` -ne 2910; then
- echo 'shar: mh-to-pcmail-export was damaged during transit (should have been 2910 bytes)'
- fi
- fi ; : end of overwriting check
- echo 'x - nntp.c'
- if test -f nntp.c; then echo 'shar: not overwriting nntp.c'; else
- sed 's/^X//' << '________This_Is_The_END________' > nntp.c
- X/*LINTLIBRARY*/
- X
- X/*
- X GNU-EMACS PCMAIL mail reader support utility
- X
- X Written by Mark L. Lambert
- X Architecture Group, Network Products Division
- X Oracle Corporation
- X 20 Davis Dr,
- X Belmont CA, 94002
- X
- X internet: markl@oracle.com or markl%oracle.com@apple.com
- X UUCP: {hplabs,uunet,apple}!oracle!markl
- X
- XCopyright (C) 1989 Mark L. Lambert
- X
- XThis file is not officially part of GNU Emacs, but is being
- Xdonated to the Free Software Foundation. As such, it is
- Xsubject to the standard GNU-Emacs General Public License,
- Xreferred to below.
- X
- XGNU Emacs is distributed in the hope that it will be useful,
- Xbut WITHOUT ANY WARRANTY. No author or distributor
- Xaccepts responsibility to anyone for the consequences of using it
- Xor for whether it serves any particular purpose or works at all,
- Xunless he says so in writing. Refer to the GNU Emacs General Public
- XLicense for full details.
- X
- XEveryone is granted permission to copy, modify and redistribute
- XGNU Emacs, but only under the conditions described in the
- XGNU Emacs General Public License. A copy of this license is
- Xsupposed to have been given to you along with GNU Emacs so you
- Xcan know your rights and responsibilities. It should be in a
- Xfile named COPYING. Among other things, the copyright notice
- Xand this notice must be preserved on all copies.
- X*/
- X
- X/* NNTP client library */
- X
- X#include <stdio.h>
- X#include "nntp.h"
- X#include <sys/types.h>
- X#include <sys/socket.h>
- X#include <netinet/in.h>
- X#include <netdb.h>
- X#include <errno.h>
- X
- X/* local procedures */
- Xint nntp_get_socket(), nntp_parse_response(), nntp_read(), nntp_getc();
- Xvoid nntp_inc_ptr();
- X
- Xchar *nntp_errors[] =
- X{
- X "no error",
- X "I/O error",
- X "socket error",
- X "host not responding",
- X "service unavailable",
- X "host name unknown",
- X "connection reset by foreign host",
- X "protocol violation"
- X};
- X
- Xchar *nntp_errstring(nnp)
- X register Nntp_stream *nnp;
- X{
- X return(nntp_errors[nntp_errno(nnp)]);
- X}
- X
- Xint nntp_open_connection(server, nnp)
- X
- Xchar *server;
- Xregister Nntp_stream *nnp;
- X{
- X memchr(nnp, 0, sizeof(Nntp_stream)); /* zorch */
- X nnp->nn_new_data_begin = nnp->nn_old_data_begin = nnp->nn_inbuf;
- X nnp->nn_nbytes = 0;
- X if((nnp->nn_skt = nntp_get_socket(nnp, server)) == ERROR)
- X return(ERROR);
- X else if(nntp_in(nnp) == ERROR) /* get server banner */
- X goto CommErr;
- X else if(nntp_parse_response(nnp) == ERROR)
- X goto CommErr;
- X return(OK);
- X
- X CommErr:
- X if(nnp->nn_skt) (void) close(nnp->nn_skt);
- X return(ERROR);
- X}
- X
- Xint nntp_get_socket(nnp, host)
- X
- Xregister Nntp_stream *nnp;
- Xchar *host;
- X{
- X int s;
- X struct sockaddr_in address;
- X struct servent *svc_info;
- X struct hostent *host_info;
- X
- X if(! (svc_info = getservbyname("nntp", "tcp")))
- X {
- X nnp->nn_error = NN_ERR_NOSVC;
- X return(ERROR);
- X }
- X else if(! (host_info = gethostbyname(host)))
- X {
- X nnp->nn_error = NN_ERR_NOHOST;
- X return(ERROR);
- X }
- X memchr((char *) &address, 0, sizeof(address));
- X memcpy((char *) &(address.sin_addr), host_info->h_addr, host_info->h_length);
- X address.sin_family = host_info->h_addrtype;
- X address.sin_port = svc_info->s_port;
- X if((s = socket(host_info->h_addrtype, SOCK_STREAM, 0)) == ERROR)
- X {
- X nnp->nn_error = NN_ERR_SKT;
- X return(ERROR);
- X }
- X else if(connect(s, &address, sizeof(address)) == ERROR)
- X {
- X nnp->nn_error = NN_ERR_CONN;
- X return(ERROR);
- X }
- X else return(s);
- X}
- X
- Xint nntp_out(nnp, str)
- X
- Xregister Nntp_stream *nnp;
- Xregister char *str;
- X{
- X register char *bptr = nnp->nn_outbuf;
- X register int nchrs;
- X register int len;
- X
- X if(*str == '.' && strlen(str) > 1) /* stuff a dot if necessary */
- X *bptr++ = '.';
- X memcpy(bptr, str, strlen(str));
- X bptr += strlen(str);
- X memcpy(bptr, "\r\n", 2);
- X bptr += 2;
- X
- X /* we've stuffed the string into the output buffer,complete with dot-stuffing
- X and CRLF. Now find length and reset bptr */
- X len = bptr - nnp->nn_outbuf;
- X bptr = nnp->nn_outbuf;
- X while(len)
- X {
- X if((nchrs = send(nnp->nn_skt, bptr, len, 0)) == ERROR)
- X {
- X if(errno == 0)
- X nnp->nn_error = NN_ERR_RESET;
- X else
- X nnp->nn_error = NN_ERR_IO;
- X return(ERROR);
- X }
- X bptr += nchrs;
- X len -= nchrs;
- X }
- X return(OK);
- X}
- X
- X/* return 0 if end of list (dot by itself), 1 otherwise, -1 if error */
- X
- Xint nntp_in(nnp)
- X
- Xregister Nntp_stream *nnp;
- X{
- X if(nntp_read(nnp) == ERROR)
- X return(ERROR);
- X if(nnp->nn_reply[0] == '.') /* de-stuff a dot if necessary */
- X if(strcmp(nnp->nn_reply, ".") == 0) return(0);
- X else if(nnp->nn_reply[1] == '.')
- X (void) strcpy(nnp->nn_reply, nnp->nn_reply + 1);
- X return(1);
- X}
- X
- X/* return FALSE if the current server reply contains an error response, TRUE
- X else, ERROR if error */
- X
- Xint nntp_parse_response(nnp)
- X
- Xregister Nntp_stream *nnp;
- X{
- X char reply_code[512]; /* protocol may lose, so use huge buffer */
- X
- X if(sscanf(nnp->nn_reply, "%s", reply_code) != 1)
- X {
- X nnp->nn_error == NN_ERR_PROTO;
- X return(ERROR);
- X }
- X nnp->nn_reply_code = atoi(reply_code);
- X if(*reply_code == CHAR_ERR || *reply_code == CHAR_FATAL ||
- X *reply_code < CHAR_INF)
- X return(FALSE);
- X return(TRUE);
- X}
- X
- Xint nntp_command(nnp, msg)
- X
- Xregister Nntp_stream *nnp;
- Xregister char *msg;
- X{
- X if(nntp_out(nnp, msg) == ERROR) return(ERROR);
- X else if(nntp_in(nnp) == ERROR) return(ERROR);
- X else return(nntp_parse_response(nnp));
- X}
- X
- Xvoid nntp_close(nnp)
- X
- Xregister Nntp_stream *nnp;
- X{
- X (void) nntp_command(nnp, "QUIT");
- X if(nnp->nn_skt) (void) close(nnp->nn_skt);
- X}
- X
- X/* read from the nntp server, if result is an end-of-list (dot by itself),
- X return TRUE else FALSE, ERROR if error */
- Xint nntp_list_end_p(nnp)
- X register Nntp_stream *nnp;
- X{
- X int endp;
- X
- X if((endp = nntp_in(nnp)) == 0) return(TRUE);
- X else if(endp == 1) return(FALSE);
- X else return(ERROR);
- X}
- X
- X/* read into an NNTP buffer, not including the carriage-return-newline pair
- X that terminate every NNTP command and response. Assumes the supplied
- X buffer is at least 512 bytes long, since that is the maximum length of
- X an NNTP command/response. This is gross since VMS won't let us use
- X stdio to do buffering. Instead, we need to do our own buffering. Ick. */
- X
- X#define NNTP_INC(nnp) (nnp)->nn_new_data_begin++; (nnp)->nn_nbytes--;
- X#define NNTP_NOCRLF 0
- X#define NNTP_CR 1
- X
- Xint nntp_read(nnp)
- X register Nntp_stream *nnp;
- X{
- X register char *bptr = nnp->nn_reply;
- X register int nchrs;
- X register int crlf_state = NNTP_NOCRLF;
- X
- X while(TRUE)
- X {
- X if(nnp->nn_nbytes == 0) /* empty buffer? Fill it */
- X {
- X nnp->nn_new_data_begin = nnp->nn_inbuf;
- X if((nchrs = recv(nnp->nn_skt, nnp->nn_inbuf, sizeof(nnp->nn_inbuf),
- X 0)) == ERROR)
- X {
- X if(errno != 0)
- X nnp->nn_error = NN_ERR_IO;
- X else
- X nnp->nn_error = NN_ERR_RESET;
- X return(ERROR);
- X }
- X nnp->nn_nbytes += nchrs;
- X }
- X
- X /* look for CRLF */
- X while(nnp->nn_nbytes)
- X {
- X if(*(nnp->nn_new_data_begin) == '\r')
- X {
- X NNTP_INC(nnp); /* punt the CR */
- X crlf_state = NNTP_CR;
- X }
- X else
- X {
- X if(crlf_state == NNTP_CR)
- X {
- X if(*(nnp->nn_new_data_begin) == '\n')
- X {
- X NNTP_INC(nnp); /* punt the LF */
- X *bptr = '\0';
- X return(TRUE);
- X }
- X else
- X {
- X *bptr++ = '\r'; /* replace CR */
- X }
- X }
- X *bptr++ = *(nnp->nn_new_data_begin);
- X NNTP_INC(nnp);
- X crlf_state = NNTP_NOCRLF;
- X }
- X }
- X }
- X}
- ________This_Is_The_END________
- if test `wc -c < nntp.c` -ne 7448; then
- echo 'shar: nntp.c was damaged during transit (should have been 7448 bytes)'
- fi
- fi ; : end of overwriting check
- exit 0
-
-